GitHub
The SuperAGI GitHub Tool enables users to perform various operations on GitHub repositories which include adding files or folders, deleting files, and searching for files or folders within a repository.
Features
- Add Files or Folders: With SuperAGI's GitHub Tool, you can add files or folders to a GitHub repository
- Delete Files: Remove files from a GitHub repository using SuperAGI's GitHub Tool.
- Search for Files or Folders: Find specific files or folders within a GitHub repository using SuperAGI's GitHub Tool.
Add GitHub Configuration Settings in SuperAGI Dashboard
Add the following configuration settings to the GitHub Toolkit Page:
GitHub Access Token:
- Obtain a GitHub access token with the necessary permissions for accessing and modifying repositories.
- Go to Settings in your GitHub Account. Then go to Developer Settings.
- Click on "Personal access tokens". Then click on "Tokens (classic)".
- Click on "Generate new token". Then choose "Generate new token (classic)".
- Write a Note about what the token is for and choose an appropriate expiration date.
- Select all the scopes (In this way, users won't have to create new Access Tokens every time we add new scopes to the code).
- Click on Generate New Token.
- Copy the token and save it as a separate file.
Github User Name:
- You can find your GitHub username on your GitHub Profile.
Configuring in SuperAGI Dashboard: -You can add your Generated Token and your Username to the GitHub Toolkit Page.
Running SuperAGI GitHub Tool
Add Files or Folders:
To add a file or folder to a GitHub repository, specify the repository and the owner's UserName and the path where the file/folder should be added to your goal. SuperAGI will upload it to the repository and automatically raise a PR for it. By default, it'll pick the main branch, if you want to add it to any other branch you have to mention it in the goal.
Delete Files:
To delete a file from a GitHub repository, mention the repository, owner's UserName and provide the path to the file you want to delete in your goal. SuperAGI will handle the deletion process and raise a PR for it. By default, it'll pick the main branch, if you want to delete it to any other branch you have to mention it in the goal.
Search for Files or Folders
To search for files or folders within a GitHub repository, specify the repository, and owner's UserName and provide the name or path of the file/folder you're looking for in your goal. SuperAGI will provide you with the search results. By default, it'll pick the main branch, if you want to search in any other branch you have to mention it in the goal.